package com.wicket.okrbff.web.contorller;

import com.wicket.okrbff.biz.service.OrgPositionService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrframework.integration.FwBaseOrgPositionClient;
import com.wicket.okrframework.integration.dto.QueryDeptPositionInfoListRespDto;
import com.wicket.okrframework.integration.dto.QueryDeptPositionInfoListReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffOrgPositionDto;
import cn.hutool.core.bean.BeanUtil;
import java.util.stream.Collectors;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrframework.integration.dto.QueryOrgDeptPositionListBorderRespDto;
import com.wicket.okrframework.integration.dto.QueryOrgDeptPositionListBorderReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffOrgDeptPositionDto;
import com.wicket.okrframework.integration.dto.QueryDeptStationInfoListRespDto;
import com.wicket.okrframework.integration.dto.QueryDeptStationInfoListReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffStationDto;
import com.wicket.okrframework.integration.dto.QueryDeptStationListRespDto;
import com.wicket.okrframework.integration.dto.QueryDeptStationListReqDto;
import com.wicket.okrframework.integration.dto.QueryPositionOrgListRespDto;
import com.wicket.okrframework.integration.dto.QueryPositionOrgListReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "OrgPosition", tags = {"OrgPosition"})
@RestController
// @RequestMapping("/oms/orgPosition/")
public class OrgPositionController {

    @Autowired
    OrgPositionService orgPositionService;

    /**
   * B1-3查询部门职务明细列表（边界）
   * gen by moon at 8/10/2022, 3:31:13 AM
   */
    @PostMapping("/oms/orgPosition/queryDeptPositionInfoList")
    @ApiOperation(value = "B1-3查询部门职务明细列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryDeptPositionInfoListRespDto> queryDeptPositionInfoList(@RequestBody(required=false) @Validated BffQueryDeptPositionInfoListReqDto reqDTO){
        return OkrResult.success(orgPositionService.queryDeptPositionInfoList(reqDTO));
    }

    /**
   * B1-3查询部门下岗位列表（边界）
   * gen by moon at 8/10/2022, 3:35:49 AM
   */
    @PostMapping("/oms/orgPosition/queryDeptStationListBorder")
    @ApiOperation(value = "B1-3查询部门下岗位列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryDeptStationListBorderRespDto> queryDeptStationListBorder(@RequestBody(required=false) @Validated BffQueryDeptStationListBorderReqDto reqDTO){
        return OkrResult.success(orgPositionService.queryDeptStationListBorder(reqDTO));
    }

    /**
   * B1-3查询部门岗位明细列表（边界）
   * gen by moon at 8/10/2022, 3:35:12 AM
   */
    @PostMapping("/oms/deptPosition/queryDeptSatAndPstList")
    @ApiOperation(value = "B1-3查询部门岗位明细列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryDeptSatAndPstListRespDto> queryDeptSatAndPstList(@RequestBody(required=false) @Validated BffQueryDeptSatAndPstListReqDto reqDTO){
        return OkrResult.success(orgPositionService.queryDeptSatAndPstList(reqDTO));
    }

    /**
   * B1-3查询部门职务列表（边界）
   * gen by moon at 8/10/2022, 3:35:08 AM
   */
    @PostMapping("/oms/mgt/orgPosition/queryDeptPositionListBorder")
    @ApiOperation(value = "B1-3查询部门职务列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryDeptPositionListBorderRespDto> queryDeptPositionListBorder(@RequestBody(required=false) @Validated BffQueryDeptPositionListBorderReqDto reqDTO){
        return OkrResult.success(orgPositionService.queryDeptPositionListBorder(reqDTO));
    }

    /**
   * B1-3查询组织岗位列表（边界）
   * gen by moon at 8/10/2022, 3:37:37 AM
   */
    @PostMapping("/oms/orgPosition/queryOrgStationList")
    @ApiOperation(value = "B1-3查询组织岗位列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryOrgStationListRespDto> queryOrgStationList(@RequestBody(required=false) @Validated BffQueryOrgStationListReqDto reqDTO){
        return OkrResult.success(orgPositionService.queryOrgStationList(reqDTO));
    }

    /**
   * B1-3查询部门岗位列表（边界）
   * gen by moon at 8/10/2022, 3:37:36 AM
   */
    @PostMapping("/oms/orgPosition/queryDeptStationList")
    @ApiOperation(value = "B1-3查询部门岗位列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryDeptStationListRespDto> queryDeptStationList(@RequestBody(required=false) @Validated BffQueryDeptStationListReqDto reqDTO){
        return OkrResult.success(orgPositionService.queryDeptStationList(reqDTO));
    }

    /**
   * B1-3查询职务归属组织列表（管理）
   * gen by moon at 8/10/2022, 3:35:51 AM
   */
    @PostMapping("/oms/mgt/deptPosition/queryPositionOrgList")
    @ApiOperation(value = "B1-3查询职务归属组织列表（管理）", response = OkrResult.class)
    public OkrResult<BffQueryPositionOrgListRespDto> queryPositionOrgList(@RequestBody(required=false) @Validated BffQueryPositionOrgListReqDto reqDTO){
        return OkrResult.success(orgPositionService.queryPositionOrgList(reqDTO));
    }
}
